<!--  -->
<template>
  <div class="decollect">
    <div class="docollect-header">
      <i class="iconfont icon-jiantou3" onclick="window.history.back()">收藏</i>
      <span>{{ getDetail.name }}</span>
    </div>
    <div class="content">
      <div class="img">
        <img :src="getDetail.face" alt="" />
      </div>
      <div class="title">
        {{ getDetail.lastText }}
      </div>
    </div>
  </div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》';

export default {
  //import引入的组件需要注入到components对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {};
  },
  computed: {
    getDetail() {
      console.log(this.$store.state.detailLists);
      return this.$store.state.detailLists;
    },
  },
  mounted() {
    // this.getDetil();
    console.log(this.$route.params.id);
    this.$store.dispatch("actChangedetailLists", this.$route.params.id);
  },
};
</script>
<style lang='less'>
.decollect {
  .docollect-header {
    width: 100%;
    height: 4.4rem;
    position: fixed;
    top: 0;
    left: 0;
    text-align: center;
    font-size: 1.6rem;
    line-height: 4.4rem;
    color: #494949;
    background: #efefef;
    font-weight: bold;
    i {
      margin-left: 2rem;
      float: left;
    }
    span {
      margin-left: -6rem;
    }
  }
  .content {
    margin: 6.4rem auto;
    width: 90%;
    height: 100%;
    .img {
      width: 100%;
      height: 20rem;
      margin-bottom: 2rem;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .title {
      text-indent: 1rem;
    }
  }
}
</style>